//
//  UploadService.m
//  WisdomStar
//
//  Created by 谭飞 on 2018/11/13.
//  Copyright © 2018年 zhangliwen. All rights reserved.
//

#import "UploadService.h"

#import "GetQNUploadInfoAPI.h"

@implementation UploadService

/**
 获取七牛上传token

 @param type 上传类型
 @param complete call back
 */
+ (void)getQnUploadInfoWithType:(UploadType)type params:(nullable NSMutableDictionary *)params completion:(nonnull void (^)(id _Nonnull))complete {
    GetQNUploadInfoAPI *api = [[GetQNUploadInfoAPI alloc] init];
    api.uploadType = type;
    api.outerParameters = params;
    [api startWithCompletionBlockWithSuccess:^(__kindof YTKBaseRequest * _Nonnull request) {
        complete(request.responseObject);
    } failure:^(__kindof YTKBaseRequest * _Nonnull request) {
        complete(request.responseObject);
    }];
}

@end
